package us.ohec.utils {
  public class NumberUtil {
    public static function trim(value:Object, length:Number = 0): Object {
      var str:RegExp = /[^0-9]/gi;
      var out:String = value.toString().replace(str, "");

      if (length != 0) {
        out = out.substr(0, length);
      }
      return Object(out);
    }
  }
}